BVD Sign Inference in IBC based on BV and BVP Components

ABSTRACT

A decoder receives, from a bitstream for a block vector (BV), an indication of a block vector predictor (BVP). The decoder determines a sign of a first component of a block vector difference (BVD) based on a component of the BV and a component of the BVP. The decoder decodes the BV based on the BVP and the BVD. The decoder generates an intra block compensated prediction of a current block (CB) based on the BV. The decoder decodes the CB based on the intra block compensated prediction and a residual of the CB.

CROSS REFERENCE TO RELATED APPLIATIONS

This application is a continuation of U.S. Application No. 17/472,264,filed Sep. 10, 2021, which claims the benefit of Provisional ApplicationNo. 63/077,226, filed Sep. 11, 2020, all of which are herebyincorporated by reference in their entireties.

BRIEF DESCRIPTION OF THE DRAWINGS

Examples of several of the various embodiments of the present disclosureare described herein with reference to the drawings.

FIG. 1 illustrates an exemplary video coding/decoding system in whichembodiments of the present disclosure may be implemented.

FIG. 2 illustrates an exemplary encoder in which embodiments of thepresent disclosure may be implemented.

FIG. 3 illustrates an exemplary decoder in which embodiments of thepresent disclosure may be implemented.

FIG. 4 illustrates an example quadtree partitioning of a coding treeblock (CTB) in accordance with embodiments of the present disclosure.

FIG. 5 illustrates a corresponding quadtree of the example quadtreepartitioning of the CTB in FIG. 4 in accordance with embodiments of thepresent disclosure.

FIG. 6 illustrates example binary and ternary tree partitions inaccordance with embodiments of the present disclosure.

FIG. 7 illustrates an example quadtree + multi-type tree partitioning ofa CTB in accordance with embodiments of the present disclosure.

FIG. 8 illustrates a corresponding quadtree + multi-type tree of theexample quadtree + multi-type tree partitioning of the CTB in FIG. 7 inaccordance with embodiments of the present disclosure.

FIG. 9 illustrates an example set of reference samples determined forintra prediction of a current block being encoded or decoded inaccordance with embodiments of the present disclosure.

FIG. 10A illustrates the 35 intra prediction modes supported by HEVC inaccordance with embodiments of the present disclosure.

FIG. 10B illustrates the 67 intra prediction modes supported by HEVC inaccordance with embodiments of the present disclosure.

FIG. 11 illustrates the current block and reference samples from FIG. 9in a two-dimensional x, y plane in accordance with embodiments of thepresent disclosure.

FIG. 12 illustrates an example angular mode prediction of the currentblock from FIG. 9 in accordance with embodiments of the presentdisclosure.

FIG. 13A illustrates an example of inter prediction performed for acurrent block in a current picture being encoded in accordance withembodiments of the present disclosure.

FIG. 13B illustrates an example horizontal component and verticalcomponent of a motion vector in accordance with embodiments of thepresent disclosure.

FIG. 14 illustrates an example of bi-prediction, performed for a currentblock in accordance with embodiments of the present disclosure.

FIG. 15A illustrates an example location of five spatial candidateneighboring blocks relative to a current block being coded in accordancewith embodiments of the present disclosure.

FIG. 15B illustrates an example location of two temporal, co-locatedblocks relative to a current block being coded in accordance withembodiments of the present disclosure.

FIG. 16 illustrates an example of IBC applied for screen content inaccordance with embodiments of the present disclosure.

FIG. 17A illustrates an example search range constraint for IBC mode inaccordance with embodiments of the present disclosure.

FIG. 17B illustrates an example search range constraint for IBC mode inaccordance with embodiments of the present disclosure.

FIG. 17C illustrates an example search range constraint for IBC mode inaccordance with embodiments of the present disclosure.

FIG. 18 illustrates an example of an invalid reference block and a validreference block for a current block being coded in accordance withembodiments of the present disclosure.

FIG. 19 illustrates a flowchart of a method for signaling IBC predictioninformation for a block in accordance with embodiments of the presentdisclosure.

FIG. 20 illustrates a flowchart of a method for receiving IBC predictioninformation for a block in accordance with embodiments of the presentdisclosure.

FIG. 21 illustrates a block diagram of an example computer system inwhich embodiments of the present disclosure may be implemented.

DETAILED DESCRIPTION

In the following description, numerous specific details are set forth inorder to provide a thorough understanding of the disclosure. However, itwill be apparent to those skilled in the art that the disclosure,including structures, systems, and methods, may be practiced withoutthese specific details. The description and representation herein arethe common means used by those experienced or skilled in the art to mosteffectively convey the substance of their work to others skilled in theart. In other instances, well-known methods, procedures, components, andcircuitry have not been described in detail to avoid unnecessarilyobscuring aspects of the disclosure.

References in the specification to “one embodiment,” “an embodiment,”“an example embodiment,” etc., indicate that the embodiment describedmay include a particular feature, structure, or characteristic, butevery embodiment may not necessarily include the particular feature,structure, or characteristic. Moreover, such phrases are not necessarilyreferring to the same embodiment. Further, when a particular feature,structure, or characteristic is described in connection with anembodiment, it is submitted that it is within the knowledge of oneskilled in the art to affect such feature, structure, or characteristicin connection with other embodiments whether or not explicitlydescribed.

Also, it is noted that individual embodiments may be described as aprocess which is depicted as a flowchart, a flow diagram, a data flowdiagram, a structure diagram, or a block diagram. Although a flowchartmay describe the operations as a sequential process, many of theoperations can be performed in parallel or concurrently. In addition,the order of the operations may be re-arranged. A process is terminatedwhen its operations are completed, but could have additional steps notincluded in a figure. A process may correspond to a method, a function,a procedure, a subroutine, a subprogram, etc. When a process correspondsto a function, its termination can correspond to a return of thefunction to the calling function or the main function.

The term “computer-readable medium” includes, but is not limited to,portable or non-portable storage devices, optical storage devices, andvarious other mediums capable of storing, containing, or carryinginstruction(s) and/or data. A computer-readable medium may include anon-transitory medium in which data can be stored and that does notinclude carrier waves and/or transitory electronic signals propagatingwirelessly or over wired connections. Examples of a non-transitorymedium may include, but are not limited to, a magnetic disk or tape,optical storage media such as compact disk (CD) or digital versatiledisk (DVD), flash memory, memory or memory devices. A computer-readablemedium may have stored thereon code and/or machine-executableinstructions that may represent a procedure, a function, a subprogram, aprogram, a routine, a subroutine, a module, a software package, a class,or any combination of instructions, data structures, or programstatements. A code segment may be coupled to another code segment or ahardware circuit by passing and/or receiving information, data,arguments, parameters, or memory contents. Information, arguments,parameters, data, etc. may be passed, forwarded, or transmitted via anysuitable means including memory sharing, message passing, token passing,network transmission, or the like.

Furthermore, embodiments may be implemented by hardware, software,firmware, middleware, microcode, hardware description languages, or anycombination thereof. When implemented in software, firmware, middlewareor microcode, the program code or code segments to perform the necessarytasks (e.g., a computer-program product) may be stored in acomputer-readable or machine-readable medium. A processor(s) may performthe necessary tasks.

Representing a video sequence in digital form may require a large numberof bits. The data size of a video sequence in digital form may be toolarge for storage and/or transmission in many applications. Videoencoding may be used to compress the size of a video sequence to providefor more efficient storage and/or transmission. Video decoding may beused to decompress a compressed video sequence for display and/or otherforms of consumption.

FIG. 1 illustrates an exemplary video coding/decoding system 100 inwhich embodiments of the present disclosure may be implemented. Videocoding/decoding system 100 comprises a source device 102, a transmissionmedium 104, and a destination device 106. Source device 102 encodes avideo sequence 108 into a bitstream 110 for more efficient storageand/or transmission. Source device 102 may store and/or transmitbitstream 110 to destination device 106 via transmission medium 104.Destination device 106 decodes bitstream 110 to display video sequence108. Destination device 106 may receive encoded bit stream 110 fromsource device 102 via transmission medium 104. Source device 102 anddestination device 106 may be any one of a number of different devices,including a desktop computer, laptop computer, tablet computer, smartphone, wearable device, television, camera, video gaming console,set-top box, or video streaming device.

To encode video sequence 108 into bitstream 110, source device 102 maycomprise a video source 112, an encoder 114, and an output interface116. Video source 112 may provide or generate video sequence 108 from acapture of a natural scene and/or a synthetically generated scene. Asynthetically generated scene may be a scene comprising computergenerated graphics or screen content. Video source 112 may comprise avideo capture device (e.g., a video camera), a video archive comprisingpreviously captured natural scenes and/or synthetically generatedscenes, a video feed interface to receive captured natural scenes and/orsynthetically generated scenes from a video content provider, and/or aprocessor to generate synthetic scenes.

A shown in FIG. 1 , a video sequence, such as video sequence 108, maycomprise a series of pictures (also referred to as frames). A videosequence may achieve the impression of motion when a constant orvariable time is used to successively present pictures of the videosequence. A picture may comprise one or more sample arrays of intensityvalues. The intensity values may be taken at a series of regularlyspaced locations within a picture. A color picture typically comprises aluminance sample array and two chrominance sample arrays. The luminancesample array may comprise intensity values representing the brightness(or luma component, Y) of a picture. The chrominance sample arrays maycomprise intensity values that respectively represent the blue and redcomponents of a picture (or chroma components, Cb and Cr) separate fromthe brightness. Other color picture sample arrays are possible based ondifferent color schemes (e.g., an RGB color scheme). For color pictures,a pixel may refer to all three intensity values for a given location inthe three sample arrays used to represent color pictures. A monochromepicture comprises a single, luminance sample array. For monochromepictures, a pixel may refer to the intensity value at a given locationin the single, luminance sample array used to represent monochromepictures.

Encoder 114 may encode video sequence 108 into bitstream 110. To encodevideo sequence 108, encoder 114 may apply one or more predictiontechniques to reduce redundant information in video sequence 108.Redundant information is information that may be predicted at a decoderand therefore may not be needed to be transmitted to the decoder foraccurate decoding of the video sequence. For example, encoder 114 mayapply spatial prediction (e.g., intra-frame or intra prediction),temporal prediction (e.g., inter-frame prediction or inter prediction),inter-layer prediction, and/or other prediction techniques to reduceredundant information in video sequence 108. Before applying the one ormore prediction techniques, encoder 114 may partition pictures of videosequence 108 into rectangular regions referred to as blocks. Encoder 114may then encode a block using one or more of the prediction techniques.

For temporal prediction, encoder 114 may search for a block similar tothe block being encoded in another picture (also referred to as areference picture) of video sequence 108. The block determined duringthe search (also referred to as a prediction block) may then be used topredict the block being encoded. For spatial prediction, encoder 114 mayform a prediction block based on data from reconstructed neighboringsamples of the block to be encoded within the same picture of videosequence 108. A reconstructed sample refers to a sample that was encodedand then decoded. Encoder 114 may determine a prediction error (alsoreferred to as a residual) based on the difference between a block beingencoded and a prediction block. The prediction error may representnon-redundant information that may be transmitted to a decoder foraccurate decoding of a video sequence.

Encoder 114 may apply a transform to the prediction error (e.g. adiscrete cosine transform (DCT)) to generate transform coefficients.Encoder 114 may form bitstream 110 based on the transform coefficientsand other information used to determine prediction blocks (e.g.,prediction types, motion vectors, and prediction modes). In someexamples, encoder 114 may perform one or more of quantization andentropy coding of the transform coefficients and/or the otherinformation used to determine prediction blocks before forming bitstream110 to further reduce the number of bits needed to store and/or transmitvideo sequence 108.

Output interface 116 may be configured to write and/or store bitstream110 onto transmission medium 104 for transmission to destination device106. In addition or alternatively, output interface 116 may beconfigured to transmit, upload, and/or stream bitstream 110 todestination device 106 via transmission medium 104. Output interface 116may comprise a wired and/or wireless transmitter configured to transmit,upload, and/or stream bitstream 110 according to one or more proprietaryand/or standardized communication protocols, such as Digital VideoBroadcasting (DVB) standards, Advanced Television Systems Committee(ATSC) standards, Integrated Services Digital Broadcasting (ISDB)standards, Data Over Cable Service Interface Specification (DOCSIS)standards, 3rd Generation Partnership Project (3GPP) standards,Institute of Electrical and Electronics Engineers (IEEE) standards,Internet Protocol (IP) standards, and Wireless Application Protocol(WAP) standards.

Transmission medium 104 may comprise a wireless, wired, and/or computerreadable medium. For example, transmission medium 104 may comprise oneor more wires, cables, air interfaces, optical discs, flash memory,and/or magnetic memory. In addition or alternatively, transmissionmedium 104 may comprise one more networks (e.g., the Internet) or fileservers configured to store and/or transmit encoded video data.

To decode bitstream 110 into video sequence 108 for display, destinationdevice 106 may comprise an input interface 118, a decoder 120, and avideo display 122. Input interface 118 may be configured to readbitstream 110 stored on transmission medium 104 by source device 102. Inaddition or alternatively, input interface 118 may be configured toreceive, download, and/or stream bitstream 110 from source device 102via transmission medium 104. Input interface 118 may comprise a wiredand/or wireless receiver configured to receive, download, and/or streambitstream 110 according to one or more proprietary and/or standardizedcommunication protocols, such as those mentioned above.

Decoder 120 may decode video sequence 108 from encoded bit stream 110.To decode video sequence 108, decoder 120 may generate prediction blocksfor pictures of video sequence 108 in a similar manner as encoder 114and determine prediction errors for the blocks. Decoder 120 may generatethe prediction blocks using prediction types, prediction modes, and/ormotion vectors received in encoded bit stream 110 and determine theprediction errors using transform coefficients also received in encodedbit stream 110. Decoder 120 may determine the prediction errors byweighting transform basis functions using the transform coefficients.Decoder 120 may combine the prediction blocks and prediction errors todecode video sequence 108. In some examples, decoder 120 may decode avideo sequence that approximates video sequence 108 due to, for example,lossy compression of video sequence 108 by encoder 114 and/or errorsintroduced into encoded bit stream 110 during transmission todestination device 106.

Video display 122 may display video sequence 108 to a user. Videodisplay 122 may comprise a cathode rate tube (CRT) display, liquidcrystal display (LCD), a plasma display, light emitting diode (LED)display, or any other display device suitable for displaying videosequence 108.

It should be noted that video encoding/decoding system 100 is presentedby way of example and not limitation. In the example of FIG. 1 , videoencoding/decoding system 100 may have other components and/orarrangements. For example, video source 112 may be external to sourcedevice 102. Similarly, video display device 122 may be external todestination device 106 or omitted altogether where video sequence isintended for consumption by a machine and/or storage device. In anotherexample, source device 102 may further comprise a video decoder anddestination device 104 may comprise a video encoder. In such an example,source device 102 may be configured to further receive an encoded bitstream from destination device 106 to support two-way video transmissionbetween the devices.

In the example of FIG. 1 , encoder 114 and decoder 120 may operateaccording to any one of a number of proprietary or industry video codingstandards. For example, encoder 114 and decoder 120 may operateaccording to one or more of International Telecommunications UnionTelecommunication Standardization Sector (ITU-T) H.263, ITU-T H.264 andMoving Picture Expert Group (MPEG)-4 Visual (also known as AdvancedVideo Coding (AVC)), ITU-T H.265 and MPEG-H Part 2 (also known as HighEfficiency Video Coding (HEVC), ITU-T H.265 and MPEG-I Part 3 (alsoknown as Versatile Video Coding (VVC)), the WebM VP8 and VP9 codecs, andAOMedia Video 1 (AV1).

FIG. 2 illustrates an exemplary encoder 200 in which embodiments of thepresent disclosure may be implemented. Encoder 200 encodes a videosequence 202 into a bitstream 204 for more efficient storage and/ortransmission. Encoder 200 may be implemented in video coding/decodingsystem 100 in FIG. 1 or in any one of a number of different devices,including a desktop computer, laptop computer, tablet computer, smartphone, wearable device, television, camera, video gaming console,set-top box, or video streaming device. Encoder 200 comprises an interprediction unit 206, an intra prediction unit 208, combiners 210 and212, a transform and quantization unit (TR + Q) unit 214, an inversetransform and quantization unit (iTR + iQ) 216, entropy coding unit 218,one or more filters 220, and a buffer 222.

Encoder 200 may partition the pictures of video sequence 202 into blocksand encode video sequence 202 on a block-by-block basis. Encoder 200 mayperform a prediction technique on a block being encoded using eitherinter prediction unit 206 or intra prediction unit 208. Inter predictionunit 206 may perform inter prediction by searching for a block similarto the block being encoded in another, reconstructed picture (alsoreferred to as a reference picture) of video sequence 202. Areconstructed picture refers to a picture that was encoded and thendecoded. The block determined during the search (also referred to as aprediction block) may then be used to predict the block being encoded toremove redundant information. Inter prediction unit 206 may exploittemporal redundancy or similarities in scene content from picture topicture in video sequence 202 to determine the prediction block. Forexample, scene content between pictures of video sequence 202 may besimilar except for differences due to motion or affine transformation ofthe screen content over time.

Intra prediction unit 208 may perform intra prediction by forming aprediction block based on data from reconstructed neighboring samples ofthe block to be encoded within the same picture of video sequence 202. Areconstructed sample refers to a sample that was encoded and thendecoded. Intra prediction unit 208 may exploit spatial redundancy orsimilarities in scene content within a picture of video sequence 202 todetermine the prediction block. For example, the texture of a region ofscene content in a picture may be similar to the texture in theimmediate surrounding area of the region of the scene content in thesame picture.

After prediction, combiner 210 may determine a prediction error (alsoreferred to as a residual) based on the difference between the blockbeing encoded and the prediction block. The prediction error mayrepresent non-redundant information that may be transmitted to a decoderfor accurate decoding of a video sequence.

Transform and quantization unit 214 may transform and quantize theprediction error. Transform and quantization unit 214 may transform theprediction error into transform coefficients by applying, for example, aDCT to reduce correlated information in the prediction error. Transformand quantization unit 214 may quantize the coefficients by mapping dataof the transform coefficients to a predefined set of representativevalues. Transform and quantization unit 214 may quantize thecoefficients to reduce irrelevant information in bitstream 204.Irrelevant information is information that may be removed from thecoefficients without producing visible and/or perceptible distortion invideo sequence 202 after decoding.

Entropy coding unit 218 may apply one or more entropy coding methods tothe quantized transform coefficients to further reduce the bit rate. Forexample, entropy coding unit 218 may apply context adaptive variablelength coding (CAVLC), context adaptive binary arithmetic coding(CABAC), and syntax-based context-based binary arithmetic coding (SBAC).The entropy coded coefficients are packed to form bitstream 204.

Inverse transform and quantization unit 216 may inverse quantize andinverse transform the quantized transform coefficients to determine areconstructed prediction error. Combiner 212 may combine thereconstructed prediction error with the prediction block to form areconstructed block. Filter(s) 220 may filter the reconstructed blockusing, for example, a deblocking filter and/or a sample-adaptive offset(SAO) filter. Buffer 222 may store the reconstructed block forprediction of one or more other blocks in the same and/or differentpicture of video sequence 202.

Although not shown in FIG. 2 , encoder 200 further comprises an encodercontrol unit configured to control one or more of the units of encoder200 shown in FIG. 2 . The encoder control unit may control the one ormore units of encoder 200 such that bitstream 204 is generated inconformance with the requirements of any one of a number of proprietaryor industry video coding standards. For example, the encoder controlunit may control the one or more units of encoder 200 such thatbitstream 204 is generated in conformance with one or more of ITU-TH.263, AVC, HEVC, VVC, VP8, VP9, and AV1 video coding standards.

Within the constraints of a proprietary or industry video codingstandard, the encoder control unit may attempt to minimize or reduce thebitrate of bitstream 204 and maximize or increase the reconstructedvideo quality. For example, the encoder control unit may attempt tominimize or reduce the bitrate of bitstream 204 given a level that thereconstructed video quality may not fall below, or attempt to maximizeor increase the reconstructed video quality given a level that the bitrate of bitstream 204 may not exceed. The encoder control unit maydetermine/control one or more of: partitioning of the pictures of videosequence 202 into blocks, whether a block is inter predicted by interprediction unit 206 or intra predicted by intra prediction unit 208, amotion vector for inter prediction of a block, an intra prediction modeamong a plurality of intra prediction modes for intra prediction of ablock, filtering performed by filter(s) 220, and one or more transformtypes and/or quantization parameters applied by transform andquantization unit 214. The encoder control unit may determine/controlthe above based on how the determination/control effects arate-distortion measure (e.g., Lagrangian rate-distortion cost) for ablock or picture being encoded. The encoder control unit maydetermine/control the above to reduce the rate-distortion measure for ablock or picture being encoded.

After being determined, the prediction type used to encode a block(intra or inter prediction), prediction information of the block (intraprediction mode if intra predicted, motion vector, etc.), and transformand quantization parameters, may be sent to entropy coding unit 218 tobe further compressed to reduce the bit rate. The prediction type,prediction information, and transform and quantization parameters may bepacked with the prediction error to form bitstream 204.

It should be noted that encoder 200 is presented by way of example andnot limitation. In other examples, encoder 200 may have other componentsand/or arrangements. For example, one or more of the components shown inFIG. 2 may be optionally included in encoder 200, such as entropy codingunit 218 and filters(s) 220.

FIG. 3 illustrates an exemplary decoder 300 in which embodiments of thepresent disclosure may be implemented. Decoder 300 decodes a bitstream302 into a decoded video sequence for display and/or some other form ofconsumption. Decoder 300 may be implemented in video coding/decodingsystem 100 in FIG. 1 or in any one of a number of different devices,including a desktop computer, laptop computer, tablet computer, smartphone, wearable device, television, camera, video gaming console,set-top box, or video streaming device. Decoder 300 comprises an entropydecoding unit 306, an inverse transform and quantization (iTR + iQ) unit308, a combiner 310, one or more filters 312, a buffer 314, an interprediction unit 316, and an intra prediction unit 318.

Although not shown in FIG. 3 , decoder 300 further comprises a decodercontrol unit configured to control one or more of the units of decoder300 shown in FIG. 3 . The decoder control unit may control the one ormore units of decoder 300 such that bitstream 302 is decoded inconformance with the requirements of any one of a number of proprietaryor industry video coding standards. For example, the decoder controlunit may control the one or more units of decoder 300 such thatbitstream 302 is decoded in conformance with one or more of ITU-T H.263,AVC, HEVC, VVC, VP8, VP9, and AV1 video coding standards.

The decoder control unit may determine/control one or more of: whether ablock is inter predicted by inter prediction unit 316 or intra predictedby intra prediction unit 318, a motion vector for inter prediction of ablock, an intra prediction mode among a plurality of intra predictionmodes for intra prediction of a block, filtering performed by filter(s)312, and one or more inverse transform types and/or inverse quantizationparameters to be applied by inverse transform and quantization unit 308.One or more of the control parameters used by the decoder control unitmay be packed in bitstream 302.

Entropy decoding unit 306 may entropy decode the bitstream 302. Inversetransform and quantization unit 308 may inverse quantize and inversetransform the quantized transform coefficients to determine a decodedprediction error. Combiner 310 may combine the decoded prediction errorwith a prediction block to form a decoded block. The prediction blockmay be generated by inter prediction unit 318 or inter prediction unit316 as described above with respect to encoder 200 in FIG. 2 . Filter(s)312 may filter the decoded block using, for example, a deblocking filterand/or a sample-adaptive offset (SAO) filter. Buffer 314 may store thedecoded block for prediction of one or more other blocks in the sameand/or different picture of the video sequence in bitstream 302. Decodedvideo sequence 304 may be output from filter(s) 312 as shown in FIG. 3 .

It should be noted that decoder 300 is presented by way of example andnot limitation. In other examples, decoder 300 may have other componentsand/or arrangements. For example, one or more of the components shown inFIG. 3 may be optionally included in decoder 300, such as entropydecoding unit 306 and filters(s) 312.

It should be further noted that, although not shown in FIGS. 2 and 3 ,each of encoder 200 and decoder 300 may further comprise an intra blockcopy unit in addition to inter prediction and intra prediction units.The intra block copy unit may perform similar to an inter predictionunit but predict blocks within the same picture. For example, the intrablock copy unit may exploit repeated patterns that appear in screencontent. Screen content may include, for example, computer generatedtext, graphics, and animation. Transport of screen content video betweendevices may be performed for many different applications, includingscreen sharing, wireless display, and cloud gaming applications.

As mentioned above, video encoding and decoding may be performed on ablock-by-block basis. The process of partitioning a picture into blocksmay be adaptive based on the content of the picture. For example, largerblock partitions may be used in areas of a picture with higher levels ofhomogeneity to improve coding efficiency.

In HEVC, a picture may be partitioned into non-overlapping squareblocks, referred to as coding tree blocks (CTBs), comprising samples ofa sample array. A CTB may have a size of 2^(n)×2^(n) samples, where nmay be specified by a parameter of the encoding system. For example, nmay be 4, 5, or 6. A CTB may be further partitioned by a recursivequadtree partitioning into coding blocks (CBs) of half vertical and halfhorizontal size. The CTB forms the root of the quadtree. A CB that isnot split further as part of the recursive quadtree partitioning may bereferred to as a leaf-CB of the quadtree and otherwise as a non-leaf CBof the quadtree. A CB may have a minimum size specified by a parameterof the encoding system. For example, a CB may have a minimum size of4x4, 8x8, 16x16, 32x32, or 64x64 samples. CBs may be the entity forwhich an encoder decided between intra and inter prediction. For interand intra prediction, a CB may be further partitioned into one or moreprediction blocks (PBs) for performing inter and intra prediction. A PBmay be a rectangular block of samples on which the same predictiontype/mode may be applied. For transformations, a CB may be partitionedinto one or more transform blocks (TBs). A TB may be a rectangular blockof samples that may determine an applied transform size.

FIG. 4 illustrates an example quadtree partitioning of a CTB 400. FIG. 5illustrates a corresponding quadtree 500 of the example quadtreepartitioning of CTB 400 in FIG. 4 . As shown in FIGS. 4 and 5 , CTB 400is first partitioned into four CBs of half vertical and half horizontalsize. Three of the resulting CBs of the first level partitioning of CTB400 are leaf-CBs. The three leaf CBs of the first level partitioning ofCTB 400 are respectively labeled 7, 8, and 9 in FIGS. 4 and 5 . Thenon-leaf CB of the first level partitioning of CTB 400 is partitionedinto four sub-CBs of half vertical and half horizontal size. Three ofthe resulting sub-CBs of the second level partitioning of CTB 400 areleaf CBs. The three leaf CBs of the second level partitioning of CTB 400are respectively labeled 0, 5, and 6 in FIGS. 4 and 5 . Finally, thenon-leaf CB of the second level partitioning of CTB 400 is partitionedinto four leaf CBs of half vertical and half horizontal size. The fourleaf CBs are respectively labeled 1, 2, 3, and 4 in FIGS. 4 and 5 .

Altogether, CTB 400 is partitioned into 10 leaf CBs respectively labeled0-9. The resulting quadtree partitioning of CTB 400 may be scanned usinga z-scan (left-to-right, top-to-bottom) to form the sequence order forencoding/decoding the CB leaf nodes. The numeric label of each CB leafnode in FIGS. 4 and 5 may correspond to the sequence order forencoding/decoding, with CB leaf node 0 encoded/decoded first and CB leafnode 9 encoded/decoded last. Although not shown in FIGS. 4 and 5 , itshould be noted that each CB leaf node may comprise one or more PBs andTBs.

In VVC, a picture may be partitioned in a similar manner as in HEVC. Apicture may be first partitioned into non-overlapping square CTBs. TheCTBs may then be partitioned by a recursive quadtree partitioning intoCBs of half vertical and half horizontal size. In VVC, a quadtree leafnode may be further partitioned by a binary tree or ternary treepartitioning into CBs of unequal sizes. FIG. 6 illustrates examplebinary and ternary tree partitions. A binary tree partition may divide aparent block in half in either the vertical direction 602 or horizontaldirection 604. The resulting partitions may be half in size as comparedto the parent block. A ternary tree partition may divide a parent blockinto three parts in either the vertical direction 606 or horizontaldirection 608. The middle partition may be twice as large as the othertwo end partitions in a ternary tree partition.

Because of the addition of binary and ternary tree partitioning, in VVCthe block partitioning strategy may be referred to as quadtree +multi-type tree partitioning. FIG. 7 illustrates an example quadtree +multi-type tree partitioning of a CTB 700. FIG. 8 illustrates acorresponding quadtree + multi-type tree 800 of the example quadtree +multi-type tree partitioning of CTB 700 in FIG. 7 . In both FIGS. 7 and8 , quadtree splits are shown in solid lines and multi-type tree splitsare shown in dashed lines. For ease of explanation, CTB 700 is shownwith the same quadtree partitioning as CTB 400 described in FIG. 4 .Therefore, description of the quadtree partitioning of CTB 700 isomitted. The description of the additional multi-type tree partitions ofCTB 700 is made relative to three leaf-CBs shown in FIG. 4 that havebeen further partitioned using one or more binary and ternary treepartitions. The three leaf-CBs in FIG. 4 that are shown in FIG. 7 asbeing further partitioned are leaf-CBs 5, 8, and 9.

Starting with leaf-CB 5 in FIG. 4 , FIG. 7 shows this leaf-CBpartitioned into two CBs based on a vertical binary tree partitioning.The two resulting CBs are leaf-CBs respectively labeled 5 and 6 in FIGS.7 and 8 . With respect to leaf-CB 8 in FIG. 4 , FIG. 7 shows thisleaf-CB partitioned into three CBs based on a vertical ternary treepartition. Two of the three resulting CBs are leaf-CBs respectivelylabeled 9 and 14 in FIGS. 7 and 8 . The remaining, non-leaf CB ispartitioned first into two CBs based on a horizontal binary treepartition, one of which is a leaf-CB labeled 10 and the other of whichis further partitioned into three CBs based on a vertical ternary treepartition. The resulting three CBs are leaf-CBs respectively labeled 11,12, and 13 in FIGS. 7 and 8 . Finally, with respect to leaf-CB 9 in FIG.4 , FIG. 7 shows this leaf-CB partitioned into three CBs based on ahorizontal ternary tree partition. Two of the three CBs are leaf-CBsrespectively labeled 15 and 19 in FIGS. 7 and 8 . The remaining,non-leaf CB is partitioned into three CBs based on another horizontalternary tree partition. The resulting three CBs are all leaf-CBsrespectively labeled 16, 17, and 18 in FIGS. 7 and 8 .

Altogether, CTB 700 is partitioned into 20 leaf CBs respectively labeled0-19. The resulting quadtree + multi-type tree partitioning of CTB 700may be scanned using a z-scan (left-to-right, top-to-bottom) to form thesequence order for encoding/decoding the CB leaf nodes. The numericlabel of each CB leaf node in FIGS. 7 and 8 may correspond to thesequence order for encoding/decoding, with CB leaf node 0encoded/decoded first and CB leaf node 19 encoded/decoded last. Althoughnot shown in FIGS. 7 and 8 , it should be noted that each CB leaf nodemay comprise one or more PBs and TBs.

In addition to specifying various blocks (e.g., CTB, CB, PB, TB), HEVCand VVC further define various units. While blocks may comprise arectangular area of samples in a sample array, units may comprise thecollocated blocks of samples from the different sample arrays (e.g.,luma and chroma sample arrays) that form a picture as well as syntaxelements and prediction data of the blocks. A coding tree unit (CTU) maycomprise the collocated CTBs of the different sample arrays and may forma complete entity in an encoded bit stream. A coding unit (CU) maycomprise the collocated CBs of the different sample arrays and syntaxstructures used to code the samples of the CBs. A prediction unit (PU)may comprise the collocated PBs of the different sample arrays andsyntax elements used to predict the PBs. A transform unit (TU) maycomprise TBs of the different samples arrays and syntax elements used totransform the TBs.

It should be noted that the term block may be used to refer to any of aCTB, CB, PB, TB, CTU, CU, PU, or TU in the context of HEVC and VVC. Itshould be further noted that the term block may be used to refer tosimilar data structures in the context of other video coding standards.For example, the term block may refer to a macroblock in AVC, amacroblock or sub-block in VP8, a superblock or sub-block in VP9, or asuperblock or sub-block in AV1.

In intra prediction, samples of a block to be encoded (also referred toas the current block) may be predicted from samples of the columnimmediately adjacent to the left-most column of the current block andsamples of the row immediately adjacent to the top-most row of thecurrent block. The samples from the immediately adjacent column and rowmay be jointly referred to as reference samples. Each sample of thecurrent block may be predicted by projecting the position of the samplein the current block in a given direction (also referred to as an intraprediction mode) to a point along the reference samples. The sample maybe predicted by interpolating between the two closest reference samplesof the projection point if the projection does not fall directly on areference sample. A prediction error (also referred to as a residual)may be determined for the current block based on differences between thepredicted sample values and the original sample values of the currentblock.

At an encoder, this process of predicting samples and determining aprediction error based on a difference between the predicted samples andoriginal samples may be performed for a plurality of different intraprediction modes, including non-directional intra prediction modes. Theencoder may select one of the plurality of intra prediction modes andits corresponding prediction error to encode the current block. Theencoder may send an indication of the selected prediction mode and itscorresponding prediction error to a decoder for decoding of the currentblock. The decoder may decode the current block by predicting thesamples of the current block using the intra prediction mode indicatedby the encoder and combining the predicted samples with the predictionerror.

FIG. 9 illustrates an example set of reference samples 902 determinedfor intra prediction of a current block 904 being encoded or decoded. InFIG. 9 , current block 904 corresponds to block 3 of partitioned CTB 700in FIG. 7 . As explained above, the numeric labels 0-19 of the blocks ofpartitioned CTB 700 may correspond to the sequence order forencoding/decoding the blocks and are used as such in the example of FIG.9 .

Given current block 904 is of w x h samples in size, reference samples902 may extend over 2w samples of the row immediately adjacent to thetop-most row of current block 904, 2h samples of the column immediatelyadjacent to the left-most column of current block 904, and the top leftneighboring corner sample to current block 904. In the example of FIG. 9, current block 904 is square, so w = h = s. For constructing the set ofreference samples 902, available samples from neighboring blocks ofcurrent block 904 may be used. Samples may not be available forconstructing the set of reference samples 902 if, for example, thesamples would lie outside the picture of the current block, the samplesare part of a different slice of the current block (where the concept ofslices are used), and/or the samples belong to blocks that have beeninter coded and constrained intra prediction is indicated. Whenconstrained intra prediction is indicated, intra prediction may not bedependent on inter predicted blocks.

In addition to the above, samples that may not be available forconstructing the set of reference samples 902 include samples in blocksthat have not already been encoded and reconstructed at an encoder ordecoded at a decoder based on the sequence order for encoding/decoding.This restriction may allow identical prediction results to be determinedat both the encoder and decoder. In FIG. 9 , samples from neighboringblocks 0, 1, and 2 may be available to construct reference samples 902given that these blocks are encoded and reconstructed at an encoder anddecoded at a decoder prior to coding of current block 904. This assumesthere are no other issues, such as those mentioned above, preventing theavailability of samples from neighboring blocks 0, 1, and 2. However,the portion of reference samples 902 from neighboring block 6 may not beavailable due to the sequence order for encoding/decoding.

Unavailable ones of reference samples 902 may be filled with availableones of reference samples 902. For example, an unavailable referencesample may be filled with a nearest available reference sampledetermined by moving in a clock-wise direction through reference samples902 from the position of the unavailable reference. If no referencesamples are available, reference samples 902 may be filled with themid-value of the dynamic range of the picture being coded.

It should be noted that reference samples 902 may be filtered based onthe size of current block 904 being coded and an applied intraprediction mode. It should be further noted that FIG. 9 illustrates onlyone exemplary determination of reference samples for intra prediction ofa block. In some proprietary and industry video coding standards,reference samples may be determined in a different manner than discussedabove. For example, multiple reference lines may be used in otherinstances, such as used in VVC.

After reference samples 902 are determined and optionally filtered,samples of current block 904 may be intra predicted based on referencesamples 902. Most encoders/decoders support a plurality of intraprediction modes in accordance with one or more video coding standards.For example, HEVC supports 35 intra prediction modes, including a planarmode, a DC mode, and 33 angular modes. VVC supports 67 intra predictionmodes, including a planar mode, a DC mode, and 65 angular modes. Planarand DC modes may be used to predict smooth and gradually changingregions of a picture. Angular modes may be used to predict directionalstructures in regions of a picture.

FIG. 10A illustrates the 35 intra prediction modes supported by HEVC.The 35 intra prediction modes are identified by indices 0 to 34.Prediction mode 0 corresponds to planar mode. Prediction mode 1corresponds to DC mode. Prediction modes 2-34 correspond to angularmodes. Prediction modes 2-18 may be referred to as horizontal predictionmodes because the principal source of prediction is in the horizontaldirection. Prediction modes 19-34 may be referred to as verticalprediction modes because the principal source of prediction is in thevertical direction.

FIG. 10B illustrates the 67 intra prediction modes supported by VVC. The67 intra prediction modes are identified by indices 0 to 66. Predictionmode 0 corresponds to planar mode. Prediction mode 1 corresponds to DCmode. Prediction modes 2-66 correspond to angular modes. Predictionmodes 2-34 may be referred to as horizontal prediction modes because theprincipal source of prediction is in the horizontal direction.Prediction modes 35-66 may be referred to as vertical prediction modesbecause the principal source of prediction is in the vertical direction.Because blocks in VVC may be non-square, some of the intra predictionmodes illustrated in FIG. 10B may be adaptively replaced by wide-angledirections.

To further describe the application of intra prediction modes todetermine a prediction of a current block, reference is made to FIGS. 11and 12 . In FIG. 11 , current block 904 and reference samples 902 fromFIG. 9 are shown in a two-dimensional x, y plane. Current block 904 isreferred to as Cb, where Cb(x, y) denotes the predicted value of currentblock 904 at the coordinates (x, y). Reference samples 902 are referredto as r, where r(x, y) denotes the reference sample of reference samples902 at the coordinates (x, y).

For planar mode, a sample in Cb may be predicted by calculating the meanof two interpolated values. The first of the two interpolated values maybe based on a horizontal linear interpolation of the predicted sample inCb. The second of the two interpolated values may be based on a verticallinear interpolation of the predicted sample in Cb. The predicted valueof the sample in Cb may be calculated as

$\begin{matrix}{Cb\left( {x,y} \right) = \frac{1}{2 \cdot s}\left( {h\left( {x,y} \right) + v\left( {x,y} \right) + s} \right)} & \text{­­­(1)}\end{matrix}$

where

$\begin{matrix}{h\left( {x,y} \right) = \left( {s - x - 1} \right) \cdot r\left( {- 1,y} \right) + \left( {x + 1} \right) \cdot r\left( {s, - 1} \right)} & \text{­­­(2)}\end{matrix}$

-   may be the horizonal linear interpolation of the predicted sample in    Cb and-   $\begin{matrix}    {v\left( {x,y} \right) = \left( {s - y - 1} \right) \cdot r\left( {x, - 1} \right) + \left( {y + 1} \right) \cdot r\left( {- 1,s} \right)} & \text{­­­(3)}    \end{matrix}$-   may be the vertical linear interpolation of the predicted sample in    Cb.

For DC mode, a sample in Cb may be predicted by the mean of thereference samples. The predicted value of the sample in Cb may becalculated as

$\begin{matrix}{Cb\left( {x,y} \right) = \frac{1}{2 \cdot s} \cdot \left( {{\sum\limits_{x = 0}^{s - 1}{r\left( {x, - 1} \right)}} + {\sum\limits_{y = 0}^{s - 1}{r\left( {- 1,y} \right)}}} \right)} & \text{­­­(4)}\end{matrix}$

A boundary filter may be applied to boundary samples in Cb to smooth thetransition between the boundary samples and their respective adjacentneighboring reference sample(s) in r.

For angular modes, a sample in Cb may be predicted by projecting theposition of the sample in a direction specified by a given angular modeto a point on the horizontal or vertical axis comprising the referencesamples r. The sample may be predicted by interpolating between the twoclosest reference samples in r of the projection point if the projectiondoes not fall directly on a reference sample in r. The directionspecified by the angular mode may be given by an angle φ definedrelative to the y-axis for vertical prediction modes (e.g., modes 19-34in HEVC and modes 35-66 in VVC) and relative to the x-axis forhorizontal prediction modes (e.g., modes 2-18 in HEVC and modes 2-34 inVVC).

FIG. 12 illustrates a sample in Cb predicted for a vertical predictionmode. For vertical prediction modes, the position (x, y) of the samplein Cb is projected onto the horizontal axis comprising reference samplesr. Because the projection falls between two reference samples r1 and r2in the example of FIG. 12 , the predicted value of the sample in Cb maybe calculated as the linear interpolation between the two referencesamples r1 and r2 as

$\begin{matrix}{Cb\left( {x,y} \right) = \left( {1 - \Delta} \right) \cdot r1 + \Delta \cdot r2} & \text{­­­(5)}\end{matrix}$

where

$\begin{matrix}{r1 = r\left( {x + \left\lfloor {\left( {y + 1} \right) \cdot \tan\varphi} \right\rfloor, - 1} \right),} & \text{­­­(6)}\end{matrix}$

$\begin{matrix}{r2 = r\left( {x + \left\lfloor {\left( {y + 1} \right) \cdot \tan\varphi} \right\rfloor + 1, - 1} \right),} & \text{­­­(7)}\end{matrix}$

$\begin{matrix}{\Delta = \left( {\left( {y + 1} \right) \cdot \tan\varphi} \right) - \left\lfloor {\left( {y + 1} \right) \cdot \tan\varphi} \right\rfloor,\text{and}} & \text{­­­(8)}\end{matrix}$

$\begin{matrix}{\left\lfloor {\, \cdot \,} \right\rfloor\text{is an integer floor}\text{.}} & \text{­­­(9)}\end{matrix}$

It should be noted that the weighting factors (1 - Δ) and Δ may becalculated with some predefined level of precision, such as 1/32 pixelprecision. To avoid floating point operations while preserving thespecified precision, the weighting factors (1 - Δ) and Δ may bemultiplied by the reciprocal of the specified precision used and thendivided by the reciprocal using, for example, right shift operations. Itshould be further noted that supplementary reference samples may beconstructed for the case where the position (x, y) of a sample Cb topredicted is projected to a negative x coordinate, which happens withnegative angles φ. The supplementary reference samples may beconstructed by projecting the reference samples in r on the verticalaxis to the horizontal axis using the angle φ. Finally, it should befurther noted that a sample in Cb may be predicted for a horizontalprediction mode in a similar manner as discussed above for verticalprediction modes. For horizontal prediction modes, the position (x, y)of the sample in Cb may be projected onto the vertical axis comprisingreference samples r and the angle φ may be defined relative to thex-axis. Supplemental reference samples may be similarly constructed forhorizontal prediction modes by projecting the reference samples in r onthe horizontal axis to the vertical axis using the angle φ.

An encoder may predict the samples of a current block being encoded,such as current block 904, for a plurality of intra prediction modes asexplained above. For example, the encoder may predict the samples of thecurrent block for each of the 35 intra prediction modes in HEVC or 67intra prediction modes in VVC. For each intra prediction mode applied,the encoder may determine a prediction error for the current block basedon a difference (e.g., sum of squared differences (SSD), sum of absolutedifferences (SAD), or sum of absolute transformed differences (SATD))between the prediction samples determined for the intra prediction modeand the original samples of the current block. The encoder may selectone of the intra prediction modes to encode the current block based onthe determined prediction errors. For example, the encoder may select anintra prediction mode that results in the smallest prediction error forthe current block. In another example, the encoder may select the intraprediction mode to encode the current block based on a rate-distortionmeasure (e.g., Lagrangian rate-distortion cost) determined using theprediction errors. The encoder may send an indication of the selectedintra prediction mode and its corresponding prediction error to adecoder for decoding of the current block.

Although the description above was primarily made with respect to intraprediction modes in HEVC and VVC, it will be understood that thetechniques of the present disclosure described above and further belowmay be applied to other intra prediction modes, including those of othervideo coding standards like VP8, VP9, AV1, and the like.

As explained above, intra prediction may exploit correlations betweenspatially neighboring samples in the same picture of a video sequence toperform video compression. Inter prediction is another coding tool thatmay be used to exploit correlations in the time domain between blocks ofsamples in different pictures of the video sequence to perform videocompression. In general, an object may be seen across multiple picturesof a video sequence. The object may move (e.g., by some translationand/or affine motion) or remain stationary across the multiple pictures.A current block of samples in a current picture being encoded maytherefore have a corresponding block of samples in a previously decodedpicture that accurately predicts the current block of samples. Thecorresponding block of samples may be displaced from the current blockof samples due to movement of an object, represented in both blocks,across the respective pictures of the blocks. The previously decodedpicture may be referred to as a reference picture and the correspondingblock of samples in the reference picture may be referred to as areference block or motion compensated prediction. An encoder may use ablock matching technique to estimate the displacement (or motion) anddetermine the reference block in the reference picture.

Similar to intra prediction, once a prediction for a current block isdetermined and/or generated using inter prediction, an encoder maydetermine a difference between the current block and the prediction. Thedifference may be referred to as a prediction error or residual. Theencoder may then store and/or signal in a bitstream the prediction errorand other related prediction information for decoding or other forms ofconsumption. A decoder may decode the current block by predicting thesamples of the current block using the prediction information andcombining the predicted samples with the prediction error.

FIG. 13A illustrates an example of inter prediction performed for acurrent block 1300 in a current picture 1302 being encoded. An encoder,such as encoder 200 in FIG. 2 , may perform inter prediction todetermine and/or generate a reference block 1304 in a reference picture1306 to predict current block 1300. Reference pictures, like referencepicture 1306, are prior decoded pictures available at the encoder anddecoder. Availability of a prior decoded picture may depend on whetherthe prior decoded picture is available in a decoded picture buffer atthe time current block 1300 is being encoded or decoded. The encodermay, for example, search one or more reference pictures for a referenceblock that is similar to current block 1300. The encoder may determine a“best matching” reference block from the blocks tested during thesearching process as reference block 1304. The encoder may determinethat reference block 1304 is the best matching reference block based onone or more cost criterion, such as a rate-distortion criterion (e.g.,Lagrangian rate-distortion cost). The one or more cost criterion may bebased on, for example, a difference (e.g., sum of squared differences(SSD), sum of absolute differences (SAD), or sum of absolute transformeddifferences (SATD)) between the prediction samples of reference block1304 and the original samples of current block 1300.

The encoder may search for reference block 1304 within a search range1308. Search range 1308 may be positioned around the collocated position(or block) 1310 of current block 1300 in reference picture 1306. In someinstances, search range 1308 may at least partially extend outside ofreference picture 1306. When extending outside of reference picture1306, constant boundary extension may be used such that the values ofthe samples in the row or column of reference picture 1306, immediatelyadjacent to the portion of search range 1308 extending outside ofreference picture 1306, are used for the “sample” locations outside ofreference picture 1306. All or a subset of potential positions withinsearch range 1308 may be searched for reference block 1304. The encodermay utilize any one of a number of different search implementations todetermine and/or generate reference block 1304. For example, the encodermay determine a set of a candidate search positions based on motioninformation of neighboring blocks to current block 1300.

One or more reference pictures may be searched by the encoder duringinter prediction to determine and/or generate the best matchingreference block. The reference pictures searched by the encoder may beincluded in one or more reference picture lists. For example, in HEVCand VVC, two reference picture lists may be used, a reference picturelist 0 and a reference picture list 1. A reference picture list mayinclude one or more pictures. Reference picture 1306 of reference block1304 may be indicated by a reference index pointing into a referencepicture list comprising reference picture 1306.

The displacement between reference block 1304 and current block 1300 maybe interpreted as an estimate of the motion between reference block 1304and current block 1300 across their respective pictures. Thedisplacement may be represented by a motion vector 1312. For example,motion vector 1312 may be indicated by a horizontal component (MV_(x))and a vertical component (MV_(y)) relative to the position of currentblock 1300. FIG. 13B illustrates the horizontal component and verticalcomponent of motion vector 1312. A motion vector, such as motion vector1312, may have fractional or integer resolution. A motion vector withfractional resolution may point between two samples in a referencepicture to provide a better estimation of the motion of current block1300. For example, a motion vector may have ½, ¼, ⅛, 1/16, or 1/32fractional sample resolution. When a motion vector points to anon-integer sample value in the reference picture, interpolation betweensamples at integer positions may be used to generate the reference blockand its corresponding samples at fractional positions. The interpolationmay be performed by a filter with two or more taps.

Once reference block 1304 is determined and/or generated for currentblock 1300 using inter prediction, the encoder may determine adifference (e.g., a corresponding sample-by-sample difference) betweenreference block 1304 and current block 1300. The difference may bereferred to as a prediction error or residual. The encoder may thenstore and/or signal in a bitstream the prediction error and the relatedmotion information for decoding or other forms of consumption. Themotion information may include motion vector 1312 and a reference indexpointing into a reference picture list comprising reference picture1306. In other instances, the motion information may include anindication of motion vector 1312 and an indication of the referenceindex pointing into the reference picture list comprising referencepicture 1306. A decoder may decode current block 1300 by determiningand/or generating reference block 1304, which forms the prediction ofcurrent block 1300, using the motion information and combining theprediction with the prediction error.

In FIG. 13A, inter prediction is performed using one reference picture1306 as the source of the prediction for current block 1300. Because theprediction for current block 1300 comes from a single picture, this typeof inter prediction is referred to as uni-prediction. FIG. 14illustrates another type of inter prediction, referred to asbi-prediction, performed for a current block 1400. In bi-prediction, thesource of the prediction for a current block 1400 comes from twopictures. Bi-prediction may be useful, for example, where the videosequence comprises fast motion, camera panning or zooming, or scenechanges. Bi-prediction may also be useful to capture fade outs of onescene or fade outs from one scene to another, where two pictures areeffectively displayed simultaneously with different levels of intensity.

Whether uni-prediction or both uni-prediction and bi-prediction areavailable for performing inter prediction may depend on a slice type ofcurrent block 1400. For P slices, only uni-prediction may be availablefor performing inter prediction. For B slices, either uni-prediction orbi-prediction may be used. When uni-prediction is performed, an encodermay determine and/or generate a reference block for predicting currentblock 1400 from reference picture list 0. When bi-prediction isperformed, an encoder may determine and/or generate a first referenceblock for predicting current block 1400 from reference picture list 0and determine and/or generate a second reference block for predictingcurrent block 1400 from reference picture list 1.

In FIG. 14 , inter-prediction is performed using bi-prediction, wheretwo reference blocks 1402 and 1404 are used to predict current block1400. Reference block 1402 may be in a reference picture of one ofreference picture list 0 or 1, and reference block 1404 may be in areference picture of the other one of reference picture list 0 or 1. Asshown in FIG. 14 , reference block 1402 is in a picture that precedesthe current picture of current block 1400 in terms of picture ordercount (POC), and reference block 1402 is in a picture that proceeds thecurrent picture of current block 1400 in terms of POC. In otherexamples, the reference pictures may both precede or procced the currentpicture in terms of POC. POC is the order in which pictures are outputfrom, for example, a decoded picture buffer and is the order in whichpictures are generally intended to be displayed. However, it should benoted that pictures that are output are not necessarily displayed butmay undergo different processing or consumption, such as transcoding. Inother examples, the two reference blocks determined and/or generatedusing bi-prediction may come from the same reference picture. In such aninstance, the reference picture may be included in both referencepicture list 0 and reference picture list 1.

A configurable weight and offset value may be applied to the one or moreinter prediction reference blocks. An encoder may enable the use ofweighted prediction using a flag in a picture parameter set (PPS) andsignal the weighting and offset parameters in the slice segment headerfor the current block. Different weight and offset parameters may besignaled for luma and chroma components.

Once reference blocks 1402 and 1404 are determined and/or generated forcurrent block 1400 using inter prediction, the encoder may determine adifference between current block 1400 and each of reference blocks 1402and 1404. The differences may be referred to as prediction errors orresiduals. The encoder may then store and/or signal in a bitstream theprediction errors and their respective related motion information fordecoding or other forms of consumption. The motion information forreference block 1402 may include motion vector 1406 and the referenceindex pointing into the reference picture list comprising the referencepicture of reference block 1402. In other instances, the motioninformation for reference block 1402 may include an indication of motionvector 1406 and an indication of the reference index pointing into thereference picture list comprising reference picture 1402. The motioninformation for reference block 1404 may include motion vector 1408 andthe reference index pointing into the reference picture list comprisingthe reference picture of reference block 1404. In other instances, themotion information for reference block 1404 may include an indication ofmotion vector 1408 and an indication of the reference index pointinginto the reference picture list comprising reference picture 1404. Adecoder may decode current block 1400 by determining and/or generatingreference blocks 1402 and 1404, which together form the prediction ofcurrent block 1400, using their respective motion information andcombining the predictions with the prediction errors.

In HEVC, VVC, and other video compression schemes, motion informationmay be predictively coded before being stored or signaled in a bitstream. The motion information for a current block may be predictivelycoded based on the motion information of neighboring blocks of thecurrent block. In general, the motion information of the neighboringblocks is often correlated with the motion information of the currentblock because the motion of an object represented in the current blockis often the same or similar to the motion of objects in the neighboringblocks. Two of the motion information prediction techniques in HEVC andVVC include advanced motion vector prediction (AMVP) and interprediction block merging.

An encoder, such as encoder 200 in FIG. 2 , may code a motion vectorusing the AMVP tool as a difference between the motion vector of acurrent block being coded and a motion vector predictor (MVP). Anencoder may select the MVP from a list of candidate MVPs. The candidateMVPs may come from previously decoded motion vectors of neighboringblocks in the current picture of the current block or blocks at or nearthe collocated position of the current block in other referencepictures. Both the encoder and decoder may generate or determine thelist of candidate MVPs.

After the encoder selects an MVP from the list of candidate MVPs, theencoder may signal, in a bitstream, an indication of the selected MVPand a motion vector difference (MVD). The encoder may indicate theselected MVP in the bitstream by an index pointing into the list ofcandidate MVPs. The MVD may be calculated based on the differencebetween the motion vector of the current block and the selected MVP. Forexample, for a motion vector represented by a horizontal component(MV_(x)) and a vertical displacement (MV_(y)) relative to the positionof the current block being coded, the MVD may be represented by twocomponents calculated as follows:

$\begin{matrix}{\text{MVD}_{x} = \text{MV}_{x} - \text{MVP}_{x}} & \text{­­­(10)}\end{matrix}$

$\begin{matrix}{\text{MVD}_{y} = \text{MV}_{y} - \text{MVP}_{y}} & \text{­­­(11)}\end{matrix}$

where MVD_(x) and MVD_(y) respectively represent the horizontal andvertical components of the MVD, and MVP_(x) and MVP_(y) respectivelyrepresent the horizontal and vertical components of the MVP. A decoder,such as decoder 300 in FIG. 3 , may decode the motion vector by addingthe MVD to the MVP indicated in the bitstream. The decoder may thendecode the current block by determining and/or generating the referenceblock, which forms the prediction of the current block, using thedecoded motion vector and combining the prediction with the predictionerror.

In HEVC and VVC, the list of candidate MVPs for AMVP may comprise twocandidates referred to as candidates A and B. Candidates A and B mayinclude up to two spatial candidate MVPs derived from five spatialneighboring blocks of the current block being coded, one temporalcandidate MVP derived from two temporal, co-located blocks when bothspatial candidate MVPs are not available or are identical, or zeromotion vectors when the spatial, temporal, or both candidates are notavailable. FIG. 15A illustrates the location of the five spatialcandidate neighboring blocks relative to a current block 1500 beingencoded. The five spatial candidate neighboring blocks are respectivelydenoted A₀, A₁, B₀, B₁, and B₂. FIG. 15B illustrates the location of thetwo temporal, co-located blocks relative to current block 1500 beingcoded. The two temporal, co-located blocks are denoted C₀ and C₁ and areincluded in a reference picture that is different from the currentpicture of current block 1500.

An encoder, such as encoder 200 in FIG. 2 , may code a motion vectorusing the inter prediction block merging tool also referred to as mergemode. Using merge mode, the encoder may reuse the same motioninformation of a neighboring block for inter prediction of a currentblock. Because the same motion information of a neighboring block isused, no MVD needs to be signaled and the signaling overhead forsignaling the motion information of the current block may be small insize. Similar to AMVP, both the encoder and decoder may generate acandidate list of motion information from neighboring blocks of thecurrent block. The encoder may then determine to use (or inherit) themotion information of one neighboring block’s motion information in thecandidate list for predicting the motion information of the currentblock being coded. The encoder may signal, in the bit stream, anindication of the determined motion information from the candidate list.For example, the encoder may signal an index pointing into the list ofcandidate motion information to indicate the determined motioninformation.

In HEVC and VVC, the list of candidate motion information for merge modemay comprise up to four spatial merge candidates that are derived fromthe five spatial neighboring blocks used in AMVP as shown in FIG. 15A,one temporal merge candidate derived from two temporal, co-locatedblocks used in AMVP as shown in FIG. 15B, and additional mergecandidates including bi-predictive candidates and zero motion vectorcandidates.

It should be noted that inter prediction may be performed in other waysand variants than those described above. For example, motion informationprediction techniques other than AMVP and merge mode are possible. Inaddition, although the description above was primarily made with respectto inter prediction modes in HEVC and VVC, it will be understood thatthe techniques of the present disclosure described above and furtherbelow may be applied to other inter prediction modes, including those ofother video coding standards like VP8, VP9, AV1, and the like. Inaddition, history based motion vector prediction (HMVP), combinedintra/inter prediction mode (CIIP), and merge mode with motion vectordifference (MMVD) as described in VVC may also be performed and arewithin the scope of the present disclosure.

In inter prediction, a block matching technique may be applied todetermine a reference block in a different picture than the currentblock being encoded. Block matching techniques have also been applied todetermine a reference block in the same picture as a current block beingencoded. However, it has been determined that for camera-capturedvideos, a reference block in the same picture as the current blockdetermined using block matching may often not accurately predict thecurrent block. For screen content video this is generally not the case.Screen content video may include, for example, computer generated text,graphics, and animation. Within screen content, there is often repeatedpatterns (e.g., repeated patterns of text and graphics) within the samepicture. Therefore, a block matching technique applied to determine areference block in the same picture as a current block being encoded mayprovide efficient compression for screen content video.

HEVC and VVC both include a prediction technique to exploit thecorrelation between blocks of samples within the same picture of screencontent video. This technique is referred to as intra block (IBC) orcurrent picture referencing (CPR). Similar to inter prediction, anencoder may apply a block matching technique to determine a displacementvector (referred to as a block vector (BV)) that indicates the relativedisplacement from the current block to a reference block (or intra blockcompensated prediction) that “best matches” the current block. Theencoder may determine the best matching reference block from blockstested during a searching process similar to inter prediction. Theencoder may determine that a reference block is the best matchingreference block based on one or more cost criterion, such as arate-distortion criterion (e.g., Lagrangian rate-distortion cost). Theone or more cost criterion may be based on, for example, a difference(e.g., sum of squared differences (SSD), sum of absolute differences(SAD), sum of absolute transformed differences (SATD), or differencedetermined based on a hash function) between the prediction samples ofthe reference block and the original samples of the current block. Areference block may correspond to prior decoded blocks of samples of thecurrent picture. The reference block may comprise decoded blocks ofsamples of the current picture prior to being processed by in-loopfiltering operations, like deblocking or SAO filtering. FIG. 16illustrates an example of IBC applied for screen content. Therectangular portions with arrows beginning at their boundaries arecurrent blocks being encoded and the rectangular portions that thearrows point to are the reference blocks for predicting the currentblocks.

Once a reference block is determined and/or generated for a currentblock using IBC, the encoder may determine a difference (e.g., acorresponding sample-by-sample difference) between the reference blockand the current block. The difference may be referred to as a predictionerror or residual. The encoder may then store and/or signal in abitstream the prediction error and the related prediction informationfor decoding or other forms of consumption. The prediction informationmay include a BV. In other instances, the prediction information mayinclude an indication of the BV. A decoder, such as decoder 300 in FIG.3 , may decode the current block by determining and/or generating thereference block, which forms the prediction of the current block, usingthe prediction information and combining the prediction with theprediction error.

In HEVC, VVC, and other video compression schemes, a BV may bepredictively coded before being stored or signaled in a bit stream. TheBV for a current block may be predictively coded based on the BV ofneighboring blocks of the current block. For example, an encoder maypredictively code a BV using the merge mode as explained above for interprediction or a similar technique as AMVP also explained above for interprediction. The technique similar to AMVP may be referred to as BVprediction and difference coding.

For BV prediction and difference coding, an encoder, such as encoder 200in FIG. 2 , may code a BV as a difference between the BV of a currentblock being coded and a BV predictor (BVP). An encoder may select theBVP from a list of candidate BVPs. The candidate BVPs may come frompreviously decoded BVs of neighboring blocks of the current block in thecurrent picture. Both the encoder and decoder may generate or determinethe list of candidate BVPs.

After the encoder selects a BVP from the list of candidate BVPs, theencoder may signal, in a bitstream, an indication of the selected BVPand a BV difference (BVD). The encoder may indicate the selected BVP inthe bitstream by an index pointing into the list of candidate BVPs. TheBVD may be calculated based on the difference between the BV of thecurrent block and the selected BVP. For example, for a BV represented bya horizontal component (BV_(x)) and a vertical component (BV_(y))relative to the position of the current block being coded, the BVD mayrepresented by two components calculated as follows:

$\begin{matrix}{\text{BVD}_{x} = \text{BV}_{x} - \text{BVP}_{x}} & \text{­­­(12)}\end{matrix}$

$\begin{matrix}{\text{BVD}_{y} = \text{BV}_{y} - \text{BVP}_{y}} & \text{­­­(13)}\end{matrix}$

where BVD_(x) and BVD_(y) respectively represent the horizontal andvertical components of the BVD, and BVP_(x) and BVP_(y) respectivelyrepresent the horizontal and vertical components of the BVP. A decoder,such as decoder 300 in FIG. 3 , may decode the BV by adding the BVD tothe BVP indicated in the bitstream. The decoder may then decode thecurrent block by determining and/or generating the reference block,which forms the prediction of the current block, using the decoded BVand combining the prediction with the prediction error.

In HEVC and VVC, the list of candidate BVPs may comprise two candidatesreferred to as candidates A and B. Candidates A and B may include up totwo spatial candidate BVPs derived from five spatial neighboring blocksof the current block being encoded, or one or more of the last two codedBVs when spatial neighboring candidates are not available (e.g., becausethey are coded in intra or inter mode). The location of the five spatialcandidate neighboring blocks relative to a current block being encodedusing IBC are the same as those shown in FIG. 15A for inter prediction.The five spatial candidate neighboring blocks are respectively denotedA₀, A₁, B₀, B₁, and B₂.

In HEVC, VVC, and other video coding implementations, an encoder signalsinformation of a coded video sequence in a bitstream based on syntaxstructures, and a decoder extracts the information of a coded videosequence from a bitstream based on syntax structures. A syntax structurerepresents a logical entity of the information coded in the bitstream.These logical entities may include, for example, parameter sets, slices,and coding tree units. Within HEVC and VCC, the syntax structures arespecified by syntax tables that indicate variations of the syntaxstructures. Syntax structures may comprise syntax elements. Syntaxelements may occur as flags, values, one-dimensional arrays, ormulti-dimensional arrays. For arrays, one or more indices may be used toreference a specific element within the array. The occurrence of asyntax element within a syntax structure may be conditional. Forexample, the occurrence of a syntax element may be conditional on thevalue of one or more other syntax elements or values determined duringthe decoding process.

In existing technologies, IBC prediction information (e.g., BVP and BVD)may be signaled in and extracted from a bit stream in the same orsimilar manner as prediction information for inter prediction. Forexample, IBC prediction information may be included in and extractedfrom a bit stream based on the same or similar syntax structures as usedfor the prediction information of inter prediction. Using the same orsimilar syntax structures for IBC mode and inter prediction may simplifythe encoding and decoding process. However, such an approach mayoverlook differences between IBC mode and inter prediction. For example,the search range of IBC mode for searching for a best matching referenceblock may be more limited than inter prediction within a picture. Thisdifference and others may allow IBC prediction information to be moreefficiently signaled in a bit stream than what is possible withprediction information for inter prediction. However, because IBC modemay use the same or similar syntax structures as inter prediction, thesesignaling efficiencies may not be realized.

Embodiments of the present disclosure are related to an approach fordecreasing the signaling overhead of IBC prediction information.Embodiments of the present disclosure may decrease the signalingoverhead by exploiting a search range limitation of IBC mode, forsearching for a best matching reference block, to conditionally signalIBC prediction information. For example, embodiments may exploit asearch range limitation of IBC mode to conditionally signal a sign of adirectional component (e.g., a horizontal or vertical component) of aBVD. Embodiments of the present disclosure may conditionally signal thesign of a directional component of a BVD in a bitstream based on whethera decoder may determine the sign of the directional component of the BVDwithout an explicit indication of the sign in the bitstream. Thecondition may be based on the BV and BVP used to determine the BVD.Because signaling of the sign of the directional component of the BVDmay be eliminated in some instances, the signaling overhead of IBCprediction information may be decreased. These and other features of thepresent disclosure are described further below.

FIG. 17A illustrates a search range constraint for IBC mode. In FIG.17A, an encoder uses IBC mode to code a current block 1700 in a currentpicture (or portion of a current picture) 1702. Current block 1700 maybe a prediction block (PB) within a current CTU 1704. Unlike interprediction that searches for a reference block in a prior decodedpicture that is different than the picture of the current block beingencoded, IBC searches for a reference block in the same, current pictureas the current block. As a result, only part of the current picture isavailable for searching for a reference block in IBC. More specifically,only the part of the current picture that has been decoded prior to theencoding of the current block. This ensures the encoding and decodingsystems can produce identical results but also limits the IBC searchrange.

In HEVC and VVC, blocks may be scanned from left-to-right, top-to-bottomusing a z-scan to form the sequence order for encoding/decoding. Basedon the z-scan, the CTUs (represented by the square tiles in FIG. 17A) tothe left and above current CTU 1704 in current picture 1702 may beencoded/decoded prior to current CTU 1704 and current block 1700.Therefore, the samples of these CTUs (shown with hatching in FIG. 17A)may form the IBC search range 1706 for searching for a reference block.

With IBC search range 1706 in place, an encoder, such as encoder 200 inFIG. 2 , may apply a block matching technique to determine a blockvector (BV) 1708 that indicates the relative displacement from currentblock 1700 to a reference block 1710 (or intra block compensatedprediction) that “best matches” current block 1700. The encoder maydetermine the best matching reference block from blocks tested, withinIBC search range 1706, during a searching process similar to interprediction. The encoder may determine that a reference block is the bestmatching reference block based on one or more cost criterion, such as arate-distortion criterion (e.g., Lagrangian rate-distortion cost). Theone or more cost criterion may be based on, for example, a difference(e.g., sum of squared differences (SSD), sum of absolute differences(SAD), sum of absolute transformed differences (SATD), or differencedetermined based on a hash function) between the prediction samples ofthe reference block and the original samples of the current block.Reference block 1710 may comprise decoded samples of current picture1702 prior to being processed by in-loop filtering operations, likedeblocking or SAO filtering.

Once reference block 1710 is determined and/or generated for currentblock 1700 using IBC, the encoder may determine a difference (e.g., acorresponding sample-by-sample difference) between reference block 1710and current block 1700. The difference may be referred to as aprediction error or residual. The encoder may then store and/or signalin a bitstream the prediction error and the related predictioninformation for decoding or other forms of consumption. The predictioninformation may include BV 1708. In other instances, the predictioninformation may include an indication of BV 1708. A decoder, such asdecoder 300 in FIG. 3 , may decode current block 1700 by determiningand/or generating reference block 1710, which forms the prediction ofcurrent block 1700, using the prediction information and combining theprediction with the prediction error. For example, the decoder may useBV 1708 to determine and/or generate reference block 1710.

In HEVC, VVC, and other video compression schemes, BV 1708 may bepredictively coded before being stored or signaled in a bit stream. BV1708 for current block 1700 may be predictively coded using a similartechnique as AMVP for inter prediction. This technique may be referredto as BV prediction and difference coding. For the BV prediction anddifference coding technique, the encoder may code BV 1708 as adifference between BV 1708 and a BV predictor (BVP). The encoder mayselect the BVP from a list of candidate BVPs. The candidate BVPs maycome from previously decoded BVs of neighboring blocks of current block1700 in current picture 1702. Both the encoder and decoder may generateor determine the list of candidate BVPs.

After the encoder selects a BVP from the list of candidate BVPs, theencoder may determine a BV difference (BVD). The BVD may be calculatedbased on the difference between BV 1708 and the selected BVP. Forexample, for BV 1708 represented by a horizontal component (BV_(x)) anda vertical component (BV_(y)) relative to the position of current block1700 being coded, the BVD may represented by two directional componentscalculated according to equations (12) and (13) above, which arereproduced below:

$\begin{matrix}{\text{BVD}_{x} = \text{BV}x - \text{BVP}_{x}} & \text{­­­(12)}\end{matrix}$

$\begin{matrix}{\text{BVD}_{y} = \text{BV}y - \text{BVP}_{y}} & \text{­­­(13)}\end{matrix}$

where BVD_(x) and BVD_(y) respectively represent the horizontal andvertical components of the BVD, and BVP_(x) and BVP_(y) respectivelyrepresent the horizontal and vertical components of the BVP.

The encoder may signal, in a bit stream, an indication of the selectedBVP (e.g., via an index pointing into the list of candidate BVPs) andthe BVD given by equations (12) and (13). A decoder may decode BV 1708by adding the BVD to the BVP indicated in the bitstream. The decoder maythen decode current block 1700 by determining and/or generatingreference block 1710, which forms the prediction of current block 1700,using the decoded BV and combining the prediction with the predictionerror.

It can be shown that, because of the IBC search range constraintdiscussed above in FIG. 17A, the sign (or direction) of BVD_(x) may bedetermined based on BVP_(X) and BV_(y) when BVP_(x) and BV_(y) satisfycertain conditions. Thus, when BVP_(x) and BV_(y) satisfy theconditions, an encoder may not signal the sign of BVD_(x) in thebitstream because a decoder may determine the sign of BVD_(x), withoutan explicit indication, based on BVP_(x) and BV_(y).

Before discussing the conditions that, when satisfied by BV_(y) andBVP_(x), determine the sign of BVD_(x), it is important to understandhow the location of samples and blocks in a picture are referenced.Typically, the location of a sample in a picture is indicated by asample number in the horizontal direction (given by the variable x) anda sample number in the vertical direction (given by the variable y)relative to the origin ((x, y) = (0,0)) of the picture coordinate systemin the top left corner of the picture. In the horizontal direction, thepositive direction is to the right. Thus, as x increases, the samplelocation moves further right in the positive, horizontal direction. Inthe vertical direction, the positive direction is down. Thus, as yincreases, the sample location moves further down in the positive,vertical direction. The location of a block in a picture may be given bythe location of its top left sample relative to the origin of thepicture coordinate system in the top left corner of the picture.

With the above, exemplary understanding of how the location of samplesin a picture may be referenced, the conditions that, when satisfied byBV_(y) and BVP_(x), determine the sign of BVD_(x) may be furtherdescribed. More specifically, it can be shown that BVD_(x) is less thanor equal to zero and therefore has a negative sign when the followingtwo conditions are respectively satisfied by BV_(y) and BVP_(x):

$\begin{matrix}{\text{BV}_{y} > 0} & \text{­­­(14)}\end{matrix}$

$\begin{matrix}{\text{BVP}_{x} > 0} & \text{­­­(15)}\end{matrix}$

FIG. 17B is illustrative of the consequence of the condition of equation(14) being true. FIG. 17B shows a BV 1712, defined relative the top leftsample of current block 1700, that has a vertical component BV_(y)greater than 0 as specified in the condition of equation (14) andtherefore points down relative to the top left sample of current block1700 in the positive, vertical direction. Because BV_(y) points downrelative to the top left sample of current block 1700, reference block1710 pointed to by BV 1712 is in region A (shown in dashed lines) of IBCsearch range 1706. Based on reference block 1710 being in region A, thehorizontal component BV_(x) of BV 1712 points to the left of the topleft sample of current block 1700 and therefore is less than zero. Inother words, given the condition BV_(y) > 0 of equation (14) is true,reference block 1710 is in region A and:

$\begin{matrix}{\text{BV}_{x} < 0} & \text{­­­(16)}\end{matrix}$

Given that BV_(X) = BVP_(x) + BVD_(x), equation (16) can rewritten as:

$\begin{matrix}{\text{BVD}_{x} < - \text{BVP}_{x}} & \text{­­­(17)}\end{matrix}$

If the condition BVP_(x) > 0 of equation (15) is further satisfied, then-BVP_(x) < 0 and, based on equation (17), BVD_(x) is less than zero(BVD_(x) < 0). Thus, given equations (14) and (15) are satisfied, anencoder may not signal the sign of BVD_(x) in the bitstream because adecoder may determine BVD_(x) is less than zero and therefore has anegative sign based on BVP_(x) and BV_(y).

It can be further shown that, because of the IBC search range constraintdiscussed above in FIG. 17A, the sign (or direction) of BVD_(y) may bedetermined based on BV_(x) and BVP_(y) when BV_(x) and BVP_(y) satisfycertain conditions. Thus, when BV_(x) and BVP_(y) satisfy theconditions, an encoder may not signal the sign of BVD_(y) in thebitstream because a decoder may determine the sign of BVD_(y), withoutan explicit indication, based on BV_(x) and BVP_(y). More specifically,it can be shown that BVD_(y) is less than or equal to zero and thereforehas a negative sign when the following two conditions are respectivelysatisfied by BV_(x) and BVP_(y):

$\begin{matrix}{\text{BV}_{x} > 0} & \text{­­­(19)}\end{matrix}$

$\begin{matrix}{\text{BVP}_{y} > 0} & \text{­­­(20)}\end{matrix}$

FIG. 17C is illustrative of the consequence of the condition of equation(19) being true. FIG. 17C shows a BV 1714, defined relative the top leftsample of current block 1700, that has a horizontal component BV_(x)greater than 0 as specified in the condition of equation (19) andtherefore points to the right relative to the top left sample of currentblock 1700 in the positive, horizontal direction. Because BV_(x) pointsto the right relative to the top left sample of current block 1700,reference block 1716 pointed to by BV 1714 is in region B (shown indashed lines) of IBC search range 1706. Based on reference block 1716being in region B, the vertical component BV_(y) of BV 1714 points upfrom the top left sample of current block 1700 and therefore is lessthan 0. In other words, given the condition BV_(x) > 0 of equation (19)is true, reference block 1716 is in region B and:

$\begin{matrix}{\text{BV}_{y} < 0} & \text{­­­(21)}\end{matrix}$

Given that BV_(y) = BVP_(y) + BVD_(y), equation (21) can rewritten as:

$\begin{matrix}{\text{BVD}_{y} < - \text{BVP}_{y}} & \text{­­­(22)}\end{matrix}$

If the condition BVP_(y) > 0 of equation (20) is further satisfied, then-BVP_(y) < 0 and, based on equation (22), BVD_(y) is less than zero(BVD_(y) < 0). Thus, given equations (19) and (20) are satisfied, anencoder may not signal the sign of BVD_(y) in the bitstream because adecoder may determine BVD_(y) is less than zero and therefore has anegative sign based on BVP_(y) and BV_(x).

In an embodiment, an encoder signals the sign of BVD_(x) and BVD_(y) ina bitstream based on a syntax structure, and a decoder extracts the signof BVD_(x) and BVD_(y) from a bitstream based on the syntax structure.The sign of BVD_(x) and BVD_(y) may be included in the syntax structureas a syntax element. For example, the sign of BVD_(x) and BVD_(y) may beincluded in the motion vector difference syntax structure of VVC as aone dimensional array with the name mvd_sign_flag. The sign of BVD_(y)may correspond to mvd_sign_flag[0], and the sign of BVD_(x) maycorrespond to mvd_sign_flag[1]. Table 1 below provides an example of themotion vector difference syntax structure.

TABLE 1 mvd_coding( x0, y0, refList,cpIdx ) { Descriptorabs_mvd_greater0_flag[ 0 ] ae(v) abs_mvd_greater0_flag[ 1 ] ae(v) if(abs_mvd_greater0_flag[ 0 ] ) abs_mvd_greater1_flag[ 0 ] ae(v) if(abs_mvd_greater0_flag[ 1 ] ) abs_mvd_greater1_flag[ 1 ] ae(v) if(abs_mvd_greater0_flag[ 0 ] ) { if( abs_mvd_greater1_flag[ 0 ] )abs_mvd_minus2[ 0 ] ae(v) mvd_sign_flag[ 0 ] ae(v) } if(abs_mvd_greater0_flag[ 1 ] ) { if( abs_mvd_greater1_flag[ 1 ] )abs_mvd_minus2[ 1 ] ae(v) mvd_sign_flag[ 1 ] ae(v) } }

The syntax structure in Table 1 may be modified to make the occurrenceof the syntax element mvd_sign_flag[0] conditional on BVP_(y) and BV_(x)as explained above and/or the occurrence of the syntax elementmvd_sign_flag[1] conditional on BVP_(x) and BV_(y) as also explainedabove. More specifically, the syntax structure in Table 1 may bemodified as shown in Table 2 or 3 below with additions shown inunderlining and italics.

TABLE 2 mvd_coding( x0, y0, refList,cpIdx ) { Descriptorabs_mvd_greater0_flag[ 0 ] ae(v) abs_mvd_greater0_flag[ 1 ] ae(v) if(abs_mvd_greater0_flag[ 0 ] )) abs_mvd_greater1_flag[ 0 ] ae(v) if(abs_mvd_greater0_flag[ 1 ] ) abs_mvd_greater1_flag[ 1 ] ae(v) if(abs_mvd_greater0_flag[ 0 ] ) { if( abs_mvd_greater1_flag[ 0 ] )abs_mvd_minus2[ 0 ] ae(v) mvd_sign_flag[ 0 ] ae(v) } if(abs_mvd_greater0_flag[ 1 ] ) { if( abs_mvd_greater1_flag[ 1 ] )abs_mvd_minus2[ 1 ] ae(v) if(is ibc && (BV_(y) > 0) && (BVP_(x) > 0 ))mvd_sign_flag[ 1 ]=1 else mvd_sign_flag[ 1 ] ae(v) } }

Based on the modified syntax structure in Table 2, the syntax elementmvd_sign_flag[1] is conditionally signaled based on BV_(y) and BVP_(x).If both BV_(y) and BVP_(x) are greater than zero, then mvd_sign_flag[1]is not explicitly signaled in or extracted from the bitstream. Rather,the value of mvd_sign_flag[1] is determined to be 1 or negative.Otherwise, if both BV_(y) and BVP_(x) are not greater than zero (orpositive), then mvd_sign_flag[1] is explicitly signaled in and extractedfrom the bitstream.

TABLE 3 mvd_coding( x0, y0, refList,cpIdx ) { Descriptorabs_mvd_greater0_flag[ 0 ] ae(v) abs_mvd_greater0_flag[ 1 ] ae(v) if(abs_mvd_greater0_flag[ 0 ] ) abs_mvd_greater1_flag[ 0 ] ae(v) if(abs_mvd_greater0_flag[ 1 ] ) abs_mvd_greater1_flag[ 1 ] ae(v) if(abs_mvd_greater0_flag[ 1 ] ) { if( abs_mvd_greater1_flag[ 1 ] )abs_mvd_minus2[ 1 ] ae(v) mvd_sign_flag[ 1 ] ae(v) } if(abs_mvd_greater0_flag[ 0 ] ) { if( abs_mvd_greater1_flag[ 0 ] )abs_mvd_minus2[ 0 ] ae(v) if(is ibc && (BV_(x) > 0) && (BVP_(y) > 0 ))mvd_sign_flag[ 0 ]=1 else mvd_sign_flag[ 0 ] ae(v) } }

Similarly, based on the modified syntax structure in Table 3, the syntaxelement mvd_sign_flag[0] is conditionally signaled based on BV_(x) andBVP_(y). If both BV_(x) and BVP_(y) are greater than zero (or positive),then mvd_sign_flag[0] is not explicitly signaled in or extracted fromthe bitstream. Rather, the value of mvd_sign_flag[0] is determined to be1 or negative. Otherwise, if both BV_(x) and BVP_(y) are not greaterthan zero, then mvd_sign_flag[0] is explicitly signaled in and extractedfrom the bitstream.

It should be noted that, in the added conditional statements of Tables 2and 3, the value of the syntax element is_ibc may optionally beincluded. This syntax element may be a one-bit flag that indicateswhether the prediction mode is IBC or not and may be a further conditionupon which explicit signaling of mvd_sign_flag is based.

It should be further noted that IBC search range 1706 in FIG. 17 may befurther constrained based on one more additional considerations. Forexample, IBC search range 1706 may be further constrained such that anysample in a reference block for current block 1700 is outside a CU ofcurrent block 1700. This may help to eliminate any dependency betweensamples of different PUs within the same CU. This constraint may bewritten as a constraint on the block vector. For example, so long as oneof the following two conditions are true, all samples in a referenceblock for current block 1700 will be outside the CU of current block1700:

$\begin{matrix}{\text{BV}_{x} + \text{nPbSw} + \text{xPbs} - \text{xCbs} \leq 0} & \text{­­­(23)}\end{matrix}$

$\begin{matrix}{\text{BV}_{y} + \text{nPbSh} + \text{yPbs} - \text{yCbs} \leq 0} & \text{­­­(24)}\end{matrix}$

where nPbSw and nPbSh are respectively the width and height of currentblock 1700, (xPbs, yPbs) is the location of the top left sample ofcurrent block 1700, and (xCbs, yCbs) is the location of the top leftsample of the CU of current block 1700. It can be shown that thisadditional constraint on IBC search range 1706 in FIG. 17 shifts regionA up by (nPbSw + xPbs – xCbs) and shifts region B to the left by(nPbSh + yPbs – yCbs). Because region A and B are shifted, equations(14) and (19) (or the directional block vector components BV_(y) andBV_(x)) may be adjusted based on the offsets. More specifically,equations (14) and (19) may adjusted as shown in equations (25) and (26)below:

$\begin{matrix}{\text{BV}_{y} - \text{nPbSh} - \text{yPbs} + \text{yCbs} > 0} & \text{­­­(25)}\end{matrix}$

$\begin{matrix}{\text{BV}_{x} - \text{nPbSw} - \text{xPbs} + \text{xCbs} > 0} & \text{­­­(26)}\end{matrix}$

Table 2 above may be modified based on equations (25) and (26) as wouldbe appreciated by a person of ordinary skill in the art. It should benoted that equations (14) and (19) may adjusted by other or additionaloffsets (e.g., based on chroma sample interpolation when a chroma blockvector is non-integer).

In another example, IBC search range 1706 in FIG. 17 may be furtherconstrained such that the IBC search range is limited to thereconstructed part of current CTU 1704 and samples from the CTU to theleft of current CTU 1704 so long as the samples collocated position incurrent CTU 1704 have not yet been reconstructed. This IBC search rangeconstraint has been adopted in the VVC standard. FIG. 18 illustratesexamples of an invalid reference block (Ref1) and a valid referenceblock (Ref2) for a current block (Curr) being coded based on this IBCsearch range constraint. Ref1′s collocated block position is within thereconstructed part (shown shaded in FIG. 18 ) of the current CTU ofCurr, so Ref1 is an invalid reference block. Ref2′s collated blockposition is not within the reconstructed part of the current CTU ofCurr, so Ref2 is a valid reference block. Although the IBC search rangein FIG. 18 is more constrained than IBC search range 1706 shown in FIG.17 , the sign (or direction) of BVD_(x) and BVD_(y) may be determinedbased on BVP and BV as explained above with respect to FIG. 17 .

FIG. 19 illustrates a flowchart 1900 of a method for signaling IBCprediction information for a block in accordance with embodiments of thepresent disclosure. The method of flowchart 1900 may be implemented byan encoder, such as encoder 200 in FIG. 2 .

The method of flowchart 1900 begins at 1902. At 1902, a block vector maybe determined based on a reference block or intra block compensatedprediction of a block. The block vector may indicate a displacement,within a current picture, from the block to the intra block compensatedprediction.

At 1904, a block vector difference between the block vector and a blockvector predictor may be calculated. The block vector predictor may beselected from a candidate list of block vector predictors.

At 1906, an indication of the block vector predictor and the blockvector difference may be signaled in a bit stream. A sign of adirectional component of the block vector difference may be signaledbased on a directional component of the block vector and a directionalcomponent of the block vector predictor. The indication of the blockvector predictor may be an index into the candidate list of block vectorpredictors. The candidate list of block vector predictors may beconstructed in accordance with a block vector prediction and differencecoding technique.

In an embodiment, the signaling comprises signaling, in the bit stream,the block vector difference according to a syntax structure. The sign ofthe directional component of the block vector difference may be a syntaxelement in the syntax structure. An occurrence of the syntax element inthe syntax structure may be conditioned on the direction component ofthe block vector and the directional component of the block vectorpredictor.

In an embodiment, the sign of the directional component of the blockvector may be signaled in the bit stream based on a sum of thedirectional component of the block vector and an offset. The offset maybe determined based on a dimension of the block, a location of theblock, and a location of a coding block that comprises the block. Theoffset may be determined based on based on chroma sample interpolation.

In an embodiment, the directional component of the block vectordifference is a horizontal directional component of the block vectordifference, the directional component of the block vector is a verticaldirectional component of the block vector, and the directional componentof the block vector predictor is a horizontal directional component ofthe block vector predictor. In an embodiment, the directional componentof the block vector difference is a vertical directional component ofthe block vector difference, the directional component of the blockvector is a horizontal directional component of the block vector, andthe directional component of the block vector predictor is a verticaldirectional component of the block vector predictor.

In an embodiment, the signaling the sign of the directional component ofthe block vector difference comprises implicitly signaling the sign ofthe directional component of the block vector difference based on thedirectional component of the block vector being greater than zero andthe directional component of the block vector prediction being greaterthan zero. In an embodiment, the signaling the sign of the directionalcomponent of the block vector difference comprises explicitly signalingthe sign of the directional component of the block vector differencebased on the directional component of the block vector being less thanzero or the directional component of the block vector prediction beinggreater than zero.

FIG. 20 illustrates a flowchart 2000 of a method for receiving IBCprediction information for a block in accordance with embodiments of thepresent disclosure. The method of flowchart 2000 may be implemented by adecoder, such as decoder 300 in FIG. 3 .

The method of flowchart 2000 begins at 2002. At 2002, an indication of ablock vector predictor and a block vector difference may be received fora block vector. A sign of a directional component of the block vectordifference may be determined based on a directional component of theblock vector and a directional component the block vector predictor.

At step 2004, the block vector may be decoded based on the block vectorpredictor and the block vector difference. For example, the block vectormay be determined by adding the block vector predictor and the blockvector difference.

At step 2006, an intra block compensated prediction of a block may begenerated based on the block vector.

At step 2008, the block may be decoded based on the intra blockcompensated prediction of the block and a prediction residual of theblock.

In an embodiment, the block vector and block vector difference may bereceived according to a syntax structure. The sign of the directionalcomponent of the block vector difference may be a syntax element in thesyntax structure. An occurrence of the syntax element in the syntaxstructure may be conditioned on the direction component of the blockvector and the directional component of the block vector predictor.

In an embodiment, the directional component of the block vectordifference is a horizontal directional component of the block vectordifference, the directional component of the block vector is a verticaldirectional component of the block vector, and the directional componentof the block vector predictor is a horizontal directional component ofthe block vector predictor. In an embodiment, the directional componentof the block vector difference is a vertical directional component ofthe block vector difference, the directional component of the blockvector is a horizontal directional component of the block vector, andthe directional component of the block vector predictor is a verticaldirectional component of the block vector predictor.

In an embodiment, the sign of the directional component of the blockvector difference may be determined based on the directional componentof the block vector being greater than zero and the directionalcomponent of the block vector prediction being greater than zero. In anembodiment, the sign of the directional component of the block vectordifference may be determined based on the directional component of theblock vector being less than zero or the directional component of theblock vector prediction being greater than zero.

Embodiments of the present disclosure may be implemented in hardwareusing analog and/or digital circuits, in software, through the executionof instructions by one or more general purpose or special-purposeprocessors, or as a combination of hardware and software. Consequently,embodiments of the disclosure may be implemented in the environment of acomputer system or other processing system. An example of such acomputer system 2100 is shown in FIG. 21 . Blocks depicted in thefigures above, such as the blocks in FIGS. 1, 2, and 3 , may execute onone or more computer systems 2100. Furthermore, each of the steps of theflowcharts depicted in this disclosure may be implemented on one or morecomputer systems 2100.

Computer system 2100 includes one or more processors, such as processor2104. Processor 2104 may be, for example, a special purpose processor,general purpose processor, microprocessor, or digital signal processor.Processor 2104 may be connected to a communication infrastructure 2102(for example, a bus or network). Computer system 2100 may also include amain memory 2106, such as random access memory (RAM), and may alsoinclude a secondary memory 2108.

Secondary memory 2108 may include, for example, a hard disk drive 2110and/or a removable storage drive 2112, representing a magnetic tapedrive, an optical disk drive, or the like. Removable storage drive 2112may read from and/or write to a removable storage unit 2116 in awell-known manner. Removable storage unit 2116 represents a magnetictape, optical disk, or the like, which is read by and written to byremovable storage drive 2112. As will be appreciated by persons skilledin the relevant art(s), removable storage unit 2116 includes a computerusable storage medium having stored therein computer software and/ordata.

In alternative implementations, secondary memory 2108 may include othersimilar means for allowing computer programs or other instructions to beloaded into computer system 2100. Such means may include, for example, aremovable storage unit 2118 and an interface 2114. Examples of suchmeans may include a program cartridge and cartridge interface (such asthat found in video game devices), a removable memory chip (such as anEPROM or PROM) and associated socket, a thumb drive and USB port, andother removable storage units 2118 and interfaces 2114 which allowsoftware and data to be transferred from removable storage unit 2118 tocomputer system 2100.

Computer system 2100 may also include a communications interface 2120.Communications interface 2120 allows software and data to be transferredbetween computer system 2100 and external devices. Examples ofcommunications interface 2120 may include a modem, a network interface(such as an Ethernet card), a communications port, etc. Software anddata transferred via communications interface 2120 are in the form ofsignals which may be electronic, electromagnetic, optical, or othersignals capable of being received by communications interface 2120.These signals are provided to communications interface 2120 via acommunications path 2122. Communications path 2122 carries signals andmay be implemented using wire or cable, fiber optics, a phone line, acellular phone link, an RF link, and other communications channels.

As used herein, the terms “computer program medium” and “computerreadable medium” are used to refer to tangible storage media, such asremovable storage units 2116 and 2118 or a hard disk installed in harddisk drive 2110. These computer program products are means for providingsoftware to computer system 2100. Computer programs (also calledcomputer control logic) may be stored in main memory 2106 and/orsecondary memory 2108. Computer programs may also be received viacommunications interface 2120. Such computer programs, when executed,enable the computer system 2100 to implement the present disclosure asdiscussed herein. In particular, the computer programs, when executed,enable processor 2104 to implement the processes of the presentdisclosure, such as any of the methods described herein. Accordingly,such computer programs represent controllers of the computer system2100.

In another embodiment, features of the disclosure may be implemented inhardware using, for example, hardware components such asapplication-specific integrated circuits (ASICs) and gate arrays.Implementation of a hardware state machine to perform the functionsdescribed herein will also be apparent to persons skilled in therelevant art(s).

What is claimed is:
 1. A method comprising: receiving, from a bitstreamfor a block vector (BV), an indication of a block vector predictor(BVP); determining a sign of a first component of a block vectordifference (BVD) based on a component of the BV and a component of theBVP; decoding the BV based on the BVP and the BVD; generating an intrablock compensated prediction of a current block (CB) based on the BV;and decoding the CB based on the intra block compensated prediction anda residual of the CB.
 2. The method of claim 1, wherein the determiningthe sign of the first component of the BVD further comprises, based onthe component of the BV being in a vertical direction with a positivesign, and based on the component of the BVP being in a horizontaldirection with a positive sign, determining that the first component ofthe BVD is in a horizontal direction with a negative sign.
 3. The methodof claim 1, wherein the determining the sign of the first component ofthe BVD further comprises, based on the component of the BV being in ahorizontal direction with a positive sign, and based on the component ofthe BVP being in a vertical direction with a positive sign, determiningthat the first component of the BVD is in a vertical direction with anegative sign.
 4. The method of claim 1, further comprising notextracting, from the bitstream, an indication of the sign of the firstcomponent of the BVD based on the component of the BV and the componentof the BVP.
 5. The method of claim 4, wherein the not extracting, fromthe bitstream, the indication of the sign of the first component of theBVD is further based on an indication of an intra block copy predictionmode.
 6. The method of claim 1, wherein the receiving, from thebitstream for the BV, the indication of the BVP is based on a syntaxstructure.
 7. The method of claim 1, further comprising receiving, fromthe bitstream, a magnitude of the first component of the BVD.
 8. Themethod of claim 1, further comprising receiving, from the bitstream, amagnitude and a sign of a second component of the BVD.
 9. A decodercomprising: one or more processors; and memory storing instructionsthat, when executed by the one or more processors, cause the decoder to:receive, from a bitstream for a block vector (BV), an indication of ablock vector predictor (BVP); determine a sign of a first component of ablock vector difference (BVD) based on a component of the BV and acomponent of the BVP; decode the BV based on the BVP and the BVD;generate an intra block compensated prediction of a current block (CB)based on the BV; and decode the CB based on the intra block compensatedprediction and a residual of the CB.
 10. The decoder of claim 9, whereinthe instructions, when executed by the one or more processors, furthercause the decoder to, based on the component of the BV being in avertical direction with a positive sign, and based on the component ofthe BVP being in a horizontal direction with a positive sign, determinethat the first component of the BVD is in a horizontal direction with anegative sign.
 11. The decoder of claim 9, wherein the instructions,when executed by the one or more processors, further cause the decoderto, based on the component of the BV being in a horizontal directionwith a positive sign, and based on the component of the BVP being in avertical direction with a positive sign, determine that the firstcomponent of the BVD is in a vertical direction with a negative sign.12. The decoder of claim 9, wherein the instructions, when executed bythe one or more processors, further cause the decoder to not extract,from the bitstream, an indication of the sign of the first component ofthe BVD based on the component of the BV and the component of the BVP.13. The decoder of claim 12, wherein the instructions that, whenexecuted by the one or more processors, cause the decoder to notextract, from the bitstream, an indication of the sign of the firstcomponent of the BVD are further based on an indication of an intrablock copy prediction mode.
 14. The decoder of claim 9, wherein theindication of the BVP is based on a syntax structure.
 15. The decoder ofclaim 9, wherein the instructions, when executed by the one or moreprocessors, further cause the decoder to receive, from the bitstream, amagnitude of the first component of the BVD.
 16. The decoder of claim 9,wherein the instructions, when executed by the one or more processors,further cause the decoder to receive, from the bitstream, a magnitudeand a sign of a second component of the BVD.
 17. A decoder comprising:one or more processors; and memory storing instructions that, whenexecuted by the one or more processors, cause the decoder to: receive,from a bitstream for a block vector (BV), an indication of a blockvector predictor (BVP); determine a sign of a component, in a firstdirection, of a block vector difference (BVD) based on a component, in asecond direction, of the BV, and a component, in the first direction, ofthe BVP; decode the BV based on the BVP and the BVD; generate an intrablock compensated prediction of a current block (CB) based on the BV;and decode the CB based on the intra block compensated prediction and aresidual of the CB.
 18. The decoder of claim 17, wherein theinstructions, when executed by the one or more processors, further causethe decoder to, based on the first direction being horizontal, based onthe second direction being vertical, based on the component of the BVhaving a positive sign, and based on the component of the BVP having apositive sign, determine that the component, in the first direction, ofthe BVD has a negative sign.
 19. The decoder of claim 17, wherein theinstructions, when executed by the one or more processors, further causethe decoder to, based on the first direction being vertical, based onthe second direction being horizontal, based on the component of the BVhaving a positive sign, and based on the component of the BVP having apositive sign, determine that the component, in the first direction, ofthe BVD has a negative sign.
 20. The decoder of claim 17, wherein theinstructions, when executed by the one or more processors, further causethe decoder to not extract, from the bitstream, an indication of thesign of the component of the BVD based on the component of the BV andthe component of the BVP.